
package org.ing.sisval.bl;

import java.util.ArrayList;
import org.ing.sisval.be.BEUnitario;
import org.ing.sisval.da.DAUnitario;
import org.ing.sisval.ds.DSUtil;
import org.rx.cr.bl.BLAbstract;
import org.rx.cr.conf.Config;


public class BLUnitario extends BLAbstract<BEUnitario> {

    
     private DAUnitario dao;

    public BLUnitario(Config conf){
setDSConeccion(DSUtil._DSConneccion(conf));
    }
    
//    public BLUnitario(){
//setDSConeccion(DSUtil._DSConneccion());
//    }
    @Override
    public int registrar(BEUnitario tipo) throws Exception {
     dao = new DAUnitario(getConeccion());
        return dao.registrar(tipo); }

    @Override
    public int actualizarRegistro(BEUnitario tipo) throws Exception {
      dao = new DAUnitario(getConeccion());
        return dao.actualizarRegistro(tipo);}

    @Override
    public int eliminarRegistro(BEUnitario tipo) throws Exception {
   dao = new DAUnitario(getConeccion());
        return dao.eliminarRegistro(tipo);}

    @Override
    public ArrayList<BEUnitario> buscarReferencia(String string) throws Exception {
   dao = new DAUnitario(getConeccion());
        return dao.buscarReferencia(string);}

    @Override
    public ArrayList<BEUnitario> listar() throws Exception {
    dao = new DAUnitario(getConeccion());
        return dao.listar();}

    @Override
    public BEUnitario buscar(int i) throws Exception {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    
    

}